﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using DAL;
using Models;

namespace BLL
{
   public class foodTypeBLL
    {
        //美食类别查询
        public static DataTable selectFoodBLL() {
            return foodTypeDAL.selectFood();
        }
        //查询数据条数
        public static object dataNumBLL() {
            return foodTypeDAL.dataNum();
        }
        //美食类别模糊查询
        public static DataTable foodCXBLL(string name) {
            return foodTypeDAL.foodCX(name);
        }
        //美食类别添加
        public static bool foodAddBLL(string name) {
            return foodTypeDAL.foodAdd(name)>0;
        }
        //支美食类别添加判断重复
        public static object foodCFBLL(string name) {
            return foodTypeDAL.foodCF(name);
        }
        //美食类别修改
        public static bool updateFoodBLL(FoodType f) {
            return foodTypeDAL.updatePay(f)>0;
        }
        //美食类别删除
        public static bool deleteBLL(int id) {
            return foodTypeDAL.delete(id) > 0;
        }
        //下拉框
        public static List<FoodType> liXlkBLL() {
            return foodTypeDAL.liXlk();
        }
    }
}
